|
OpenStack Queens : OpenStack Rally
2018/03/25 |
|
Install OpenStack BenchiMarking Tool, Rally.
This example is based on the environment like follows. Install and Configure Rally on Control Node as an example.
------------+---------------------------+---------------------------+------------
| | |
eth0|10.0.0.30 eth0|10.0.0.50 eth0|10.0.0.51
+-----------+-----------+ +-----------+-----------+ +-----------+-----------+
| [ Control Node ] | | [ Storage Node ] | | [ Compute Node ] |
| | | | | |
| MariaDB RabbitMQ | | Open_vSwitch | | Libvirt |
| Memcached httpd | | L2_Agent | | Nova_Compute |
| Keystone Glance | | L3_Agent | | Open_vSwitch |
| Nova_API Cinder_API | | Metadata_Agent | | L2_Agent |
| Neutron_Server | | Cinder_Volume | | Ceilometer_Compute |
| Metadata_Agent | | Heat_API | | |
| Gnocchi | | Heat Engine | | |
| Ceilometer_Central | | | | |
| Rally | | | | |
+-----------------------+ +-----------------------+ +-----------------------+
|
| [1] | Create user and Database for Rally in MariaDB. |
|
[root@dlp ~(keystone)]# mysql -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 3913 Server version: 10.1.20-MariaDB MariaDB Server Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
create database rally; Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]>
grant all privileges on rally.* to rally@'localhost' identified by 'password'; Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
grant all privileges on rally.* to rally@'%' identified by 'password'; Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
MariaDB [(none)]> flush privileges; Query OK, 0 rows affected (0.00 sec) exit Bye |
| [2] | Install Rally. |
|
[root@dlp ~(keystone)]# yum --enablerepo=centos-openstack-queens,epel -y install openstack-rally
|
| [3] | Configure Rally. |
|
[root@dlp ~(keystone)]#
vi /etc/rally/rally.conf # line 32: uncomment and change log_file = rally.log
# line 37: uncomment and change log_dir = /var/log/rally
# line 156: MariaDB connection info
connection = mysql+pymysql://rally:password@10.0.0.30/rally
mkdir /var/log/rally [root@dlp ~(keystone)]# rally db create Creating database: mysql+pymysql://rally:password@10.0.0.30/rally Database created successfully |
| [4] | Add user info to run Rally BenchiMarking Tasks. Replace user info to your own one. |
|
[root@dlp ~(keystone)]#
vi myenv.json
{
"openstack": {
"auth_url": "http://10.0.0.30:5000/v3",
"region_name": "RegionOne",
"endpoint_type": "public",
"admin": {
"username": "admin",
"password": "adminpassword",
"tenant_name": "admin"
},
"users": [
{
"username": "serverworld",
"password": "userpassword",
"tenant_name": "hiroshima"
},
]
}
}
rally deployment create --file myenv.json --name my_cloud
+--------------------------------------+---------------------+----------+------------------+--------+
| uuid | created_at | name | status | active |
+--------------------------------------+---------------------+----------+------------------+--------+
| 46e79120-2dc2-4c8b-bbb6-283a68a7d6cd | 2018-03-27T00:41:34 | my_cloud | deploy->finished | |
+--------------------------------------+---------------------+----------+------------------+--------+
Using deployment: 46e79120-2dc2-4c8b-bbb6-283a68a7d6cd
~/.rally/openrc was updated
HINTS:
* To use standard OpenStack clients, set up your env by running:
source ~/.rally/openrc
OpenStack clients are now configured, e.g run:
openstack image list
[root@dlp ~(keystone)]# source ~/.rally/openrc [root@dlp ~(keystone)]# rally deployment show my_cloud +--------------------------+-------------+----------+-------------+-------------+---------------+ | auth_url | username | password | tenant_name | region_name | endpoint_type | +--------------------------+-------------+----------+-------------+-------------+---------------+ | http://10.0.0.30:5000/v3 | admin | *** | admin | RegionOne | public | | http://10.0.0.30:5000/v3 | serverworld | *** | hiroshima | RegionOne | public | +--------------------------+-------------+----------+-------------+-------------+---------------+[root@dlp ~(keystone)]# rally deployment check -------------------------------------------------------------------------------- Platform openstack: -------------------------------------------------------------------------------- Available services: +-------------+----------------+-----------+ | Service | Service Type | Status | +-------------+----------------+-----------+ | __unknown__ | placement | Available | | __unknown__ | sharev2 | Available | | __unknown__ | volumev2 | Available | | __unknown__ | volumev3 | Available | | ceilometer | metering | Available | | cloud | cloudformation | Available | | glance | image | Available | | gnocchi | metric | Available | | heat | orchestration | Available | | keystone | identity | Available | | manila | share | Available | | neutron | network | Available | | nova | compute | Available | +-------------+----------------+-----------+ |
| [5] | How to use Rally. For a sample scenario in follwoing tutorial, there are many other samples on the site below, refer to them. ⇒ https://github.com/openstack/rally/blob/master/samples/tasks/scenarios/ |
|
# define Benchimarking scenario # for example, define a simple scenario to create and delete a compute instance # for [flavor], specify your own registered flavor name # for [image], specify your own registered image name
[root@dlp ~(keystone)]#
vi boot-and-delete.json
{
"NovaServers.boot_and_delete_server": [
{
"args": {
"flavor": {
"name": "m1.small"
},
"image": {
"name": "CentOS7"
},
"force_delete": false
},
"runner": {
"type": "constant",
"times": 10,
"concurrency": 2
},
"context": {}
}
]
}
# start BenchiMarking Tasks [root@dlp ~(keystone)]# rally task start boot-and-delete.json
--------------------------------------------------------------------------------
Preparing input task
--------------------------------------------------------------------------------
Task is:
{
"NovaServers.boot_and_delete_server": [
{
"args": {
"flavor": {
"name": "m1.small"
},
"image": {
"name": "CentOS7"
},
"force_delete": false
},
"runner": {
"type": "constant",
"times": 10,
"concurrency": 2
},
"context": {}
}
]
}
Task syntax is correct :)
Running Rally version 0.11.0
--------------------------------------------------------------------------------
Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c: started
--------------------------------------------------------------------------------
Running Task... This can take a while...
To track task status use:
rally task status
or
rally task detailed
Using task: 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c
2018-03-27 09:43:46.855 28342 INFO rally.task.engine [-] Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c | Starting: Task validation.
2018-03-27 09:43:46.878 28342 INFO rally.task.engine [-] Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c | Starting: Task validation of syntax.
2018-03-27 09:43:46.900 28342 INFO rally.task.engine [-] Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c | Completed: Task validation of syntax.
2018-03-27 09:43:46.901 28342 INFO rally.task.engine [-] Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c | Starting: Task validation of required platforms.
2018-03-27 09:43:46.916 28342 INFO rally.task.engine [-] Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c | Completed: Task validation of required platforms.
2018-03-27 09:43:46.917 28342 INFO rally.task.engine [-] Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c | Starting: Task validation of semantic.
2018-03-27 09:43:46.918 28342 INFO rally.task.engine [-] Check health of the environment '46e79120-2dc2-4c8b-bbb6-283a68a7d6cd'.
2018-03-27 09:43:48.407 28342 INFO rally.task.engine [-] Platform existing@openstack (available: True): OK!
2018-03-27 09:43:49.006 28342 INFO rally.task.context [-] Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c | Context users@openstack setup() finished in 0.58 sec
2018-03-27 09:43:51.972 28342 INFO rally.task.context [-] Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c | Context users@openstack cleanup() started
2018-03-27 09:43:51.979 28342 INFO rally.task.context [-] Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c | Context users@openstack cleanup() finished in 6.49 msec
2018-03-27 09:43:51.979 28342 INFO rally.task.engine [-] Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c | Completed: Task validation of semantic.
2018-03-27 09:43:51.980 28342 INFO rally.task.engine [-] Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c | Completed: Task validation.
2018-03-27 09:43:51.981 28342 INFO rally.api [-] Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c input file is valid.
2018-03-27 09:43:51.981 28342 INFO rally.api [-] Run Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c against Deployment 46e79120-2dc2-4c8b-bbb6-283a68a7d6cd
2018-03-27 09:43:51.982 28342 INFO rally.task.engine [-] Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c | Starting: Running task.
2018-03-27 09:43:52.037 28342 INFO rally.task.engine [-] Running workload:
position = 0
config = {
"version": 2,
"title": "A cropped version of a bigger task.",
"description": "Auto-generated task from a single workload (uuid=f430c60b-aaf3-432b-9255-fe6bf7d7eca3)",
"subtasks": [
{
"title": "NovaServers.boot_and_delete_server",
"description": "Boot and delete a server.",
"scenario": {
"NovaServers.boot_and_delete_server": {
"flavor": {
"name": "m1.small"
},
"image": {
"name": "CentOS7"
},
"force_delete": false
}
},
"contexts": {},
"runner": {
"constant": {
"times": 10,
"concurrency": 2
}
},
"hooks": [],
"sla": {
"failure_rate": {
"max": 0
}
}
}
]
}
2018-03-27 09:43:52.649 28342 INFO rally.task.context [-] Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c | Context users@openstack setup() finished in 0.59 sec
2018-03-27 09:43:52.657 28342 INFO rally.task.context [-] Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c | Context cleanup@openstack setup() finished in 0.01 msec
2018-03-27 09:43:54.581 28359 INFO rally.task.runner [-] Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c | ITER: 1 START
2018-03-27 09:43:54.596 28360 INFO rally.task.runner [-] Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c | ITER: 2 START
2018-03-27 09:44:13.535 28359 INFO rally.task.runner [-] Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c | ITER: 1 END: OK
2018-03-27 09:44:13.547 28359 INFO rally.task.runner [-] Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c | ITER: 3 START
2018-03-27 09:44:15.937 28360 INFO rally.task.runner [-] Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c | ITER: 2 END: OK
2018-03-27 09:44:15.944 28360 INFO rally.task.runner [-] Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c | ITER: 4 START
2018-03-27 09:44:26.099 28359 INFO rally.task.runner [-] Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c | ITER: 3 END: OK
2018-03-27 09:44:26.107 28359 INFO rally.task.runner [-] Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c | ITER: 5 START
2018-03-27 09:44:29.393 28360 INFO rally.task.runner [-] Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c | ITER: 4 END: OK
2018-03-27 09:44:29.401 28360 INFO rally.task.runner [-] Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c | ITER: 6 START
2018-03-27 09:44:40.583 28359 INFO rally.task.runner [-] Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c | ITER: 5 END: OK
2018-03-27 09:44:40.590 28359 INFO rally.task.runner [-] Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c | ITER: 7 START
2018-03-27 09:44:41.819 28360 INFO rally.task.runner [-] Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c | ITER: 6 END: OK
2018-03-27 09:44:41.827 28360 INFO rally.task.runner [-] Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c | ITER: 8 START
2018-03-27 09:44:53.424 28359 INFO rally.task.runner [-] Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c | ITER: 7 END: OK
2018-03-27 09:44:53.435 28359 INFO rally.task.runner [-] Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c | ITER: 9 START
2018-03-27 09:44:53.867 28360 INFO rally.task.runner [-] Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c | ITER: 8 END: OK
2018-03-27 09:44:53.879 28360 INFO rally.task.runner [-] Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c | ITER: 10 START
2018-03-27 09:45:05.812 28359 INFO rally.task.runner [-] Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c | ITER: 9 END: OK
2018-03-27 09:45:07.749 28360 INFO rally.task.runner [-] Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c | ITER: 10 END: OK
2018-03-27 09:45:07.777 28342 INFO rally.task.context [-] Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c | Context cleanup@openstack cleanup() started
2018-03-27 09:45:11.116 28342 INFO rally.task.context [-] Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c | Context cleanup@openstack cleanup() finished in 3.34 sec
2018-03-27 09:45:11.118 28342 INFO rally.task.context [-] Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c | Context users@openstack cleanup() started
2018-03-27 09:45:11.118 28342 INFO rally.task.context [-] Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c | Context users@openstack cleanup() finished in 0.86 msec
2018-03-27 09:45:12.575 28342 INFO rally.task.engine [-] Load duration is: 72.147601
2018-03-27 09:45:12.580 28342 INFO rally.task.engine [-] Full runner duration is: 73.227308
2018-03-27 09:45:12.581 28342 INFO rally.task.engine [-] Full duration is: 79.058306
2018-03-27 09:45:12.690 28342 INFO rally.task.engine [-] Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c | Completed: Running task.
--------------------------------------------------------------------------------
Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c: finished
--------------------------------------------------------------------------------
test scenario NovaServers.boot_and_delete_server
args position 0
args values:
{
"runner": {
"times": 10,
"concurrency": 2
},
"contexts": {},
"args": {
"flavor": {
"name": "m1.small"
},
"image": {
"name": "CentOS7"
},
"force_delete": false
},
"sla": {
"failure_rate": {
"max": 0
}
},
"hooks": []
}
--------------------------------------------------------------------------------
Task 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c has 0 error(s)
--------------------------------------------------------------------------------
+------------------------------------------------------------------------------------------------------
| Response Times (sec)
+--------------------+-----------+--------------+--------------+--------------+-----------+-----------+
| Action | Min (sec) | Median (sec) | 90%ile (sec) | 95%ile (sec) | Max (sec) | Avg (sec) |
+--------------------+-----------+--------------+--------------+--------------+-----------+-----------+
| nova.boot_server | 9.606 | 10.16 | 16.619 | 17.621 | 18.624 | 11.672 |
| nova.delete_server | 2.426 | 2.559 | 2.9 | 3.773 | 4.647 | 2.755 |
| total | 12.038 | 13.141 | 19.173 | 20.252 | 21.33 | 14.427 |
| -> duration | 11.038 | 12.141 | 18.173 | 19.252 | 20.33 | 13.427 |
| -> idle_duration | 1.0 | 1.0 | 1.0 | 1.0 | 1.0 | 1.0 |
+--------------------+-----------+--------------+--------------+--------------+-----------+-----------+
-----------------+
|
---------+-------+
Success | Count |
---------+-------+
100.0% | 10 |
100.0% | 10 |
100.0% | 10 |
100.0% | 10 |
100.0% | 10 |
---------+-------+
Load duration: 72.1476
Full duration: 79.0583
HINTS:
* To plot HTML graphics with this data, run:
rally task report 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c --out output.html
* To generate a JUnit report, run:
rally task export 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c --type junit --to output.xml
* To get raw JSON output of task results, run:
rally task report 83861b53-5eff-41fc-ae07-6ca5e8ebaa4c --json --out output.json
|
| [6] | To run the commands that were shown when task had completed, it's possible to generate HTML file with Graph like follows. |
|
|
|